import request from '@/utils/request'

export const lists = () => {
  return request({
    url: '/service-financial/airui/api/aaa/findAll',
    method: 'get',
  })
}
// 登录接口
export const sellfinancal = (id, remark, riskLevel, startMoney) => {
  return request({
    url: '/service-financial/airui/api/aaa/sell',
    method: 'get',
    params: {
      id,
      remark,
      riskLevel,
      startMoney,
    },
  })
}
/**
 * 支付宝购买
 * @param id
 * @param price
 * @param remark
 * @returns {AxiosPromise}
 */
export const buys = (id,price,remark) => {
  return request({
    url: '/alipay-service-7007/alipay/pay?id='+id+'&price='+price+'&remark='+remark,
    method: 'get',
  })
}
/**
 * 电子账户或银行购买
 * @returns {AxiosPromise}
 */
export const buys2 = (id,price,remark,bankCard) => {
  return request({
    url: '/service-bank/airui/api/bank/payFin?id='+id+'&price='+price+'&remark='+remark+'&bankCard='+bankCard,
    method: 'post',
  })
}
export const ebuys2 = (id,price,remark) => {
  return request({
    url: '/service-bank/airui/api/bank/payFin?id='+id+'&price='+price+'&remark='+remark,
    method: 'post',
  })
}
export const myList = () => {
  return request({
    url: '/service-financial/airui/api/aaa/myList',
    method: 'get',
  })
}
